doctype html
html
  head
    link(rel='stylesheet', href='css/graph-creator.css')
    link(rel='stylesheet', href='css/tesis.css')
    title= title
  body
    #menu
      #handle
      #autohandle
      ul#lateralMenu
        li proyecto
        li= proyecto
        li Imagen Docker
        li#nimage
        li Ambiente LMOD
        li#nmodule
        li Node ID
        li#nid
        li Node Name
        li#ntitle
        li Command
        li#ncomando
        li Working dir
        li#nwd
        li Times
        li#ntimes
        li Archivos entrada
        li#arent
        li Archivos salida
        li#arsal
        li
          button.nada(data-toggle='modal', data-target='.bs-example-modal-lg') FileManager
        li
          h5#log Log_nodo
        li
          h5#err Err_nodo
        li
          h5#out Out_nodo
      ul#opciones
      ul#mopciones
        button.nada(data-toggle='modal', data-target='.bs-example-modal-lg') check files
    #back
      li
        a(href="/builds?id="+proyecto) < Ir atras

    // Modal
    #myModal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='myModalLabel')
      .modal-dialog(role='document')
        .modal-content
          .modal-header
            button.close(type='button', data-dismiss='modal', aria-label='Close')
              span(aria-hidden='true') ×
            h4#myModalLabel.modal-title Info
          .modal-body
            p.infoo#infoo(align="left",text-align="left")
          .modal-footer
            button.btn.btn-default(type='button', data-dismiss='modal') Close
            a#seeall.btn.btn-primary(href='/', target="_blank") See all


    #filem.modal.bs-example-modal-lg(tabindex='-1', role='dialog', aria-labelledby='myLargeModalLabel', aria-hidden='true')
      .modal-dialog.modal-lg
        .modal-content
          .modal-content
            .modal-header
               button.close(type='button', data-dismiss='modal', aria-label='Close')
                 span(aria-hidden='true') ×
               h4#myModalLabel.modal-title Filemanager
            .modal-body
                div(ng-app='FileManagerApp')
                  angular-filemanager
            .modal-footer
                button.btn(data-dismiss='modal', aria-hidden='true') Cancelar
                button#filemB.btn.btn-primary Seleccionar



    script(src='vendor/d3.v3.js', charset='utf-8')
    script(src='vendor/FileSaver.min.js')
    script(src='vendor/jquery/jquery-1.11.3.min.js')
    script(type='text/javascript', src='js/filelistener.js')
    script(type='text/javascript').
      proyecto= "#{proyecto}";
      ejecucion= "#{title}";
      nodes= !{nodes};
      edgesTpm= !{edges};
      workloader = "";
      edges = [];

      function buscar(id){
        for(var i=0; i<nodes.length; i++){
            if(nodes[i].id== id){
                return i;
            }
        }
        return -1;
      }
      if (edgesTpm){
          for(var j = 0 ; j< edgesTpm.length; j++){
            edges.push({source : nodes[buscar(edgesTpm[j].source.id)], target : nodes[buscar(edgesTpm[j].target.id)]});
          }
      }
      fileListener = new FileListener();
    script(src='js/khanalg.js')
    script(src='js/graph-creator.js')
    script(src='js/r.js')

// third party
script(src='vendor/saveSvgAsPng.js')
script(src='vendor/angular-filemanager/bower_components/angular/angular.min.js')
script(src='vendor/angular-filemanager/bower_components/angular-translate/angular-translate.min.js')
script(src='vendor/angular-filemanager/bower_components/jquery/dist/jquery.min.js')
script(src='vendor/angular-filemanager/bower_components/bootstrap/dist/js/bootstrap.min.js')
link(rel='stylesheet', href='vendor/angular-filemanager/bower_components/bootswatch/paper/bootstrap.min.css')
script(src='vendor/bootstrap-notify/bootstrap-notify.min.js')
script(src='vendor/angular-filemanager/src/js/app.js')
script(src='vendor/angular-filemanager/src/js/directives/directives.js')
script(src='vendor/angular-filemanager/src/js/filters/filters.js')
script(src='vendor/angular-filemanager/src/js/providers/config.js')
script(src='vendor/angular-filemanager/src/js/entities/chmod.js')
script(src='vendor/angular-filemanager/src/js/entities/item.js')
script(src='vendor/angular-filemanager/src/js/services/apihandler.js')
script(src='vendor/angular-filemanager/src/js/services/apimiddleware.js')
script(src='vendor/angular-filemanager/src/js/services/filenavigator.js')
script(src='vendor/angular-filemanager/src/js/providers/translations.js')
script(src='vendor/angular-filemanager/src/js/controllers/main.js')
script(src='vendor/angular-filemanager/src/js/controllers/selector-controller.js')
link(href='vendor/angular-filemanager/src/css/animations.css', rel='stylesheet')
link(href='vendor/angular-filemanager/src/css/dialogs.css', rel='stylesheet')
link(href='vendor/angular-filemanager/src/css/main.css', rel='stylesheet')
script(type='text/javascript').
  angular.module('FileManagerApp').config(['fileManagerConfigProvider', function (config) {
  var defaults = config.$get();
  config.set({
  appName: 'Nada de Nada',
  allowedActions: angular.extend(defaults.allowedActions, {
  copy: false, // <--- MMM
  changePermissions: false,
  compress: false,
  compressChooseName: false,
  extract: false, // <--- MMM
  //downloadMultiple: false, // <--- MMM
  }),
  multipleDownloadFileName: 'Comprimido.rar',
  defaultLang: "es",
  listUrl: "/listar",
  getContentUrl:"/listar",
  createFolderUrl:"/crearCarpeta",
  uploadUrl:"/crearArchivos",
  renameUrl:"/editarArchivo",
  moveUrl: '/editarArchivo',
  removeUrl: '/eliminarArchivo',
  editUrl: '/editarArchivo',
  downloadFileUrl: '/descargarArchivo',
  getContentUrl: '/contenidoArchivo',
  tplPath: 'vendor/angular-filemanager/src/templates'
  });
  }]);
